'use strict';

// 登录主页
const home_fn = async (ctx, next) => {
    ctx.response.body = `
    <form action="/login/login" method="post">
        <table>
            <div>
                <label for="">账号：</label>
                <input type="text" name="username">
            </div>
            <div>
                <label for="">密码：</label>
                <input type="password" name="password">
            </div>
            <div>
                <input type="submit" value="登录">
            </div>
        </table>
    </form>
    `
}

// 暴露出去
module.exports = {
    '/': ['get', home_fn]
}